package org.yohailong.mock.client.network;


public class OkHttpManager {

    public static final String TAG = "OkHttpManager";

    /**
     * CERT_ALIAS  证书别名
     */
    public static final String CERT_ALIAS = "NCB";

    /**
     * CONNECT_TIME_OUT  连接超时
     * READ_TIME_OUT     读超时
     * WRITE_TIME_OUT    写超时
     */
    public static final int CONNECT_TIME_OUT = 75;
    public static final int READ_TIME_OUT = 75;
    public static final int WRITE_TIME_OUT = 75;

    /**
     * instance 单例
     * INSTANCE_LOCK 互斥锁
     */
    private static OkHttpManager instance = null;
    private static final Object INSTANCE_LOCK = new Object();


    /**
     * 获取单例
     *
     * @return
     */
    public static OkHttpManager getInstance() {
        if (instance == null) {
            synchronized (INSTANCE_LOCK) {
                if (instance == null) {
                    instance = new OkHttpManager();
                }
            }
        }
        return instance;
    }


}

